﻿@{
    string connid = Request["connid"];
    string table = Request["table"];
    string tablepk = Request["tablepk"];
    string where = Request["where"];

    Business.Platform.DBConnection dbconn = new Business.Platform.DBConnection();
    
    if(!connid.IsGuid())
    {
        Response.Write("流程未设置数据连接!");
        Response.End();
    }
    var conn = dbconn.Get(connid.ToGuid());
    if(conn==null)
    {
        Response.Write("未找到连接!");
        Response.End();
    }
    string sql = "SELECT * FROM " + table + " WHERE 1=1 AND " + where;
    if(dbconn.TestSql(conn, sql))
    {
        Response.Write("SQL条件正确!");
        Response.End();
    }
    else
    {
        Response.Write("SQL条件错误!");
        Response.End();
    }
}